﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Commonlib;

namespace DAL
{
    public class ItemPriceDAL
    {
        //根据条件查询ItemPriceView
        public DataTable getOrderItemPrice(string limit)
        {
            string cmdstr = "select * from OrderItemPriceView where " + limit;
            return SqlHelper.ExecuteDataSet(SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null).Tables[0];
        }

        public DataTable getItemPrice(string itemid, string username)
        {
            string cmdstr = "select * from ItemPrice where itemID=" + itemid + " and agentName='" + username + "'";
            return SqlHelper.ExecuteDataSet(SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null).Tables[0];
        }
    }
}
